package com.have.blog.xo.service.admin.impl;

import com.have.blog.model.mapper.TUserMapper;
import com.have.blog.model.models.TUserExample;
import com.have.blog.xo.service.admin.AdminUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@SuppressWarnings("all")
public class AdminUserServiceImpl implements AdminUserService {
    @Autowired
    private TUserMapper userMapper;

    @Override
    public Long getUserCount(int status) {
        TUserExample example = new TUserExample();
        TUserExample.Criteria criteria = example.createCriteria();
        criteria.andStatusEqualTo(status);
        return userMapper.countByExample(example);
    }
}
